<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="author" content="wangbo">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

</head>

<body>
    <!-- es6 -->
    <script>
        // 对象的扩展
        const obj1 = {
            name: 'frontend',
            age: 1
        }
        // const obj2 = {
        //     name: 'diveng',
        //     time: 2023
        // }
        const res = { 
            ...obj1,
            name:"王思聪" }
        console.log(res)

    </script>
</body>

</html>